#include<iostream>
#include<algorithm>
using namespace std;

int main() {
    double a [] = {1.1,4.4,3.3,2.2,},b[4];
    cout << sizeof(a) / sizeof(double) << endl;
    int c = sizeof(a) / sizeof(double);
    copy(a,a+c,ostream_iterator<double>(cout," "));
    cout << endl;
    reverse_copy(a,a+c,ostream_iterator<double>(cout," "));
    cout << endl;
    sort(a,a+c);
    copy(a,a+c,ostream_iterator<double>(cout," "));
    cout << endl;
    sort(a,a+c,greater<double>());
    copy(a,a+c,ostream_iterator<double>(cout," "));
    cout << endl;
    return 0;
}
